package com.twu.biblioteca.utility;

import java.io.OutputStream;

//An output stream which saves all output sent to it in a stringbuffer, allowing it to be retrieved as a string.
public class StringOutputStream extends OutputStream
{
    StringBuffer buf = new StringBuffer();

    public void write(int c)
    {
        buf.append((char)c);
    }

    public String getString()
    {
        return buf.toString();
    }
}